﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using CommonLib;

namespace ServerServices
{
    public interface IServerService
    {
        User peerRegister(string nome, string port);

        void cancelRegister(string user);

        IDictionary<string, User> getPeers();

        User getUser(string nome);

        IDictionary<string, User> getUsers(ArrayList users);

        void setThisServer(PServer server);

        PServer getThisServer();

        int isConnected();

        void replicate();

        List<PServer> getListOfKnownServers();

        void addNewServer(PServer server);

        void replicateData(IDictionary<string, User> listOfRegisteredPeers);

        void printKnowingServers();

        void setKnowingServers(List<PServer> list);

        void putOffline();

        void putOnline();

        void setInElection(int valor);

        PServer getKnownServer(int id);

        PServer getPrimaryServer();

        void determineThePrimary();
         
    }
    
}
